<script type="text/javascript">
<!--

//-->
</script>

	<!-- Invalid logged results -->
        {if (sizeof($deletedData) > 0) || (sizeof($transferedData) > 0)}  
            
        <div style="margin-top: 15px;">
            <table id="ivalidResultTbl" class="grid-report" cellpadding="0" cellspacing="0" style="width: 700px;">
               <caption>{translate}Updated data{/translate}</caption>
               <thead>
                   <tr>
                       <th class="first" style="width: 120px;">{translate}Doctor{/translate}</th>                       
                       <th style="width: 50px;">{translate}Patient's ID_1{/translate}</th>
                       <th style="width: 120px;">{translate}Full name{/translate}</th>                       
                       <th style="width: 80px;">{translate}Service{/translate}</th>
                       <th style="width: 80px;">{translate}Money amount{/translate}</th>                       
                       <th class="last">{translate}Note{/translate}</th>
                   </tr>
               </thead>
               <tbody>
                    {if (sizeof($transferedData) > 0)}
                        <tr><td colspan="6" align="left" class="first last" style="font-weight: bold;">{translate}Collected{/translate}</td></tr>
                                                
                        {foreach from=$transferedData item=doctor}
                            {assign var='first' value=1}                                                                                                                                                      
                                {foreach from=$doctor.doctor_data item=patient}
                                    <tr>
                                    {if $first eq 1}
                                        <td class="first" rowspan="{$doctor.doctor_num_row}">{$doctor.doctor_name}</td>                               
                                    {/if}                                    
                                        <td>{$patient.patient_code}</td>                            
                                        <td>{$patient.patient_name}</td>                                
                                        <td>{$patient.service_code}</td>
                                        <td align="right">{$patient.amount}</td>                                
                                        <td class="last">{$patient.date_modified}, {$patient.user_modified}</td>
                                    </tr>
                                    {assign var='first' value=0}                                                                              
                                 {/foreach}
                                                                                                                                                                                                                    
                         {/foreach}
                     {/if}
                                          
                      {if (sizeof($deletedData) > 0)}
                        <tr><td colspan="6" align="left" class="first last" style="font-weight: bold;">{translate}Deleted{/translate}</td></tr>
                                                
                        {foreach from=$deletedData item=doctor}
                            {assign var='first' value=1}                                                                                                                                                      
                                {foreach from=$doctor.doctor_data item=patient}
                                    <tr>
                                    {if $first eq 1}
                                        <td class="first" rowspan="{$doctor.doctor_num_row}">{$doctor.doctor_name}</td>                               
                                    {/if}                                    
                                        <td>{$patient.patient_code}</td>                            
                                        <td>{$patient.patient_name}</td>                                
                                        <td>{$patient.service_code}</td>
                                        <td align="right">{$patient.amount}</td>                                
                                        <td class="last">{$patient.date_modified}, {$patient.user_modified}</td>
                                    </tr>                                   
                                    {assign var='first' value=0}       
                                 {/foreach}
                                                                                                                                                                                                                    
                         {/foreach}
                     {/if}
                </tbody>
           </table>
       </div>
       {/if}
